Re: JDBC:Using Large Objects - Mailing list pgsql-interfaces

From Herouth Maoz
Subject Re: JDBC:Using Large Objects
Date
Msg-id l03130307b39562624224@[147.233.159.109]
Whole thread Raw
In response to JDBC:Using Large Objects  (Steffen Zimmert <szimmert@crcg.edu>)
List pgsql-interfaces
At 21:38 +0300 on 22/06/1999, Steffen Zimmert wrote:


> I created the associated database table with the following statement:
> create table images (imgname name, imgoid oid);
>
...
> // Create PreparedStatement
> PreparedStatement ps = db.prepareStatement("Insert into database values
> (?,?)");
> ps.setString(1,"TEST");
> ps.setBytes(2,objBytes);
> ps.executeUpdate();
> ps.close();

Well, if it's defined as an oid, and you pass an array of bytes to it, it
certainly won't work. An oid is a four-byte integer, not a byte array.

Please look in the Postgres programmer documentation, in the JDBC part,
under "Postgres Extensions to the JDBC API".

There is a separate mechanism to access PostgreSQL's large object
interface, as well as the geometric types etc.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




pgsql-interfaces by date:

Previous
From: Peter Mount
Date:
Subject: RE: [INTERFACES] JDBC and character sets
Next
From: Steffen Zimmert
Date:
Subject: Re: JDBC:Using Large Objects